﻿using System.Net;
using System.Runtime.Serialization;

namespace Toybox.NicoSharp.Video.RiApi
{
	using RiApiPrimitives;

	public class UserVideo : AbstractRiApi
	{

		#region [Static]

		public static UserVideo Get(string id, CookieCollection cookies = null)
		{
			if (string.IsNullOrEmpty(id)) return null;

			string url = NicoUrls.RiApi + "watch/uservideo";
			return Get<UserVideo>(url + "?user_id=" + id, cookies);
		}

		#endregion [Static]


		#region Public Members

		[DataMember]
		public bool upload_video_public_flag;

		[DataMember]
		public bool show_deflist;

		[DataMember]
		public Item[] list;

		#endregion Public Members


		#region [SubClass]

		[DataContract]
		public class Item
		{
			[DataMember]
			public string id;

			[DataMember]
			public string name;

			[DataMember]
			public string description;
		}

		#endregion [SubClass]

	}
}
